package com.itestor.iptv.modules.ne.actions;



import javax.servlet.http.HttpServletRequest;
import org.apache.log4j.Logger;
import org.apache.struts.action.ActionForm;
import com.itestor.iptv.global.actions.AbstractPagedQueryAction;
import com.itestor.iptv.global.bean.AbstractPagedQuery;
import com.itestor.iptv.modules.ne.bean.RobotManageQuery;
import com.itestor.iptv.modules.ne.service.RobotManageService;

/**
 * 
 * @author Mr.li
 * 
 */
public class RobotManageQueryAction extends AbstractPagedQueryAction {

    /**
     * Logger for this class.
     */
    private static final Logger logger = Logger
            .getLogger(RobotManageQueryAction.class);

    private RobotManageService robotManageService;
    
    @SuppressWarnings("unchecked")
    @Override   
    public AbstractPagedQuery doPagedQuery(ActionForm form,
            HttpServletRequest request, int pagerCount, int pagerOffset)
            throws Exception {
        
        String queryName = request.getParameter("queryName");
        RobotManageQuery robotManageQuery = new RobotManageQuery();
        robotManageQuery.setPagerCount(pagerCount);
        robotManageQuery.setPagerOffset(pagerOffset);
        robotManageQuery.setName(queryName);
        robotManageService.queryRobotManageList(robotManageQuery);
             
        request.setAttribute("queryName", queryName);
        return robotManageQuery;
    }

    public void setRobotManageService(RobotManageService pRobotManageService) {
        robotManageService = pRobotManageService;
    }


}